<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>image+gradient</title>
    <style>
        html,
        body {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        div {
            margin: auto;
            position: relative;
            width: 30vw;
            height: 50vh;
        }

        div:nth-child(2) {

            background: url(./yasuo.jpg) no-repeat;
            background-size: cover;
            /*高版本chrome暂未支持*/
            mask: linear-gradient(90deg, transparent, #000);
            -webkit-mask: linear-gradient(90deg, transparent, #000);
        }

        div:nth-child(4) {
            background: url(./yasuo.jpg) no-repeat;
            background-size: cover;
            -webkit-mask:
                linear-gradient(135deg, transparent 15px, #fff 0) top left,
                linear-gradient(-135deg, transparent 15px, #fff 0) top right,
                linear-gradient(-45deg, transparent 15px, #fff 0) bottom right,
                linear-gradient(45deg, transparent 15px, #fff 0) bottom left;
            -webkit-mask-size: 50% 50%;
            -webkit-mask-repeat: no-repeat;
        }

        div:nth-child(6) {
            margin: auto;
            position: relative;
            width: 25vw;
            height: 50vh;
            background: url(https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1877625006,2341162086&fm=26&gp=0.jpg) no-repeat;
            background-size: cover;


        }

        div:nth-child(6)::before {
            position: absolute;
            content: "";
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url(./kate.jpg) no-repeat;
            background-size: cover;
            -webkit-mask: linear-gradient(45deg, #000 40%, transparent 60%);
            z-index: 1;
        }


      
    </style>
</head>

<body>
    <p>实现mask渐变</p>
    <div></div>
    <p style="text-align: center;">实现图片切角遮罩</p>
    <div></div>
    <p style="text-align: center;">多占图使用mask渐变</p>
    <div></div>
    <p style="text-align: center;">图片转场动画</p>
    <p style="text-align:center">https://codepen.io/Chokcoco/pen/RwrpmyL</p>   

    更多特效见：https://github.com/chokcoco/iCSS/issues/80
</body>

</html>